import cv2
import numpy as np
img=cv2.imread('yuan.jpg')
m=np.ones(img.shape,dtype='uint8')*50
result=cv2.subtract(img,m)
cv2.imshow('c1',img)
cv2.imshow('c2',result)
cv2.waitKey()
cv2.destroyAllWindows(